#ifndef Technique_H
#define Technique_H
#include "math_3d.h"
#include <GL/glew.h>
class Technique
{
public:
	Technique(void);
	~Technique(void);
	bool onInit(char* vs_path,char* fs_path);
	void SetWVP(const Matrix4f& WVP);
	void setWorldMatrix(const Matrix4f& WorldInverse);
	void setTextureUint(GLuint texureUnit);
	GLuint getAttribLocation(const char* pAttrName);
	GLuint getUniformLocation(const char* pUniformName);
	void enable();
	char* textFileRead(char *fn);
private:
	GLuint loadShader ( GLenum type, const char *shaderSrc );
private:
	GLuint mWVPLoc;
	GLuint mWorldMatrixLoc;
	GLuint mProgramObject;
	GLuint mVertexShader;
	GLuint mFragmentShader;
	GLuint mPositionLoc;
	GLuint mTexCoordLoc;
	GLuint mColorLoc;
	GLuint mTexureLoc;
};

#endif

